<template>
  <div class="components" @click="toggleClick">
    <svg
      :class="{'is-active':isActive}"
      class="hamburger"
      viewBox="0 0 1024 1024"
      xmlns="http://www.w3.org/2000/svg"
      width="64"
      height="64"
    >
      <path d="M489.792 853.824a32 32 0 1 0 40.704 49.408L993.92 521.664 531.072 121.28a32 32 0 1 0-41.856 48.384l405.44 350.72-404.864 333.44z" p-id="13911" fill="#ffffff"></path><path d="M41.792 853.824a32 32 0 1 0 40.704 49.408L545.92 521.664 83.072 121.28a32 32 0 1 0-41.856 48.384l405.44 350.72-404.864 333.44z" p-id="13912" fill="#ffffff"></path>
    </svg>
  </div>
</template>

<script>
export default {
  name: 'Hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    }
  }
}
</script>

<style scoped>
.components{
    display: flex;
	justify-content: center;
	align-items: center;
}

.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
}

.hamburger.is-active {
  transform: rotate(180deg);
}
</style>
